import time

import pytest
from selenium import webdriver
from selenium.webdriver.common.by import By
from commons.funcs import user_login


@pytest.fixture
def driver():
    driver = webdriver.Chrome()  # 创建dirver对象：启动浏览器
    driver.maximize_window()  # 最大化
    yield driver
    driver.quit()


@pytest.mark.main
def test_a(driver):
    msg = user_login(driver, "shasda", "sdahosdiagsdbajkdhlohdakip")
    assert msg == "密码格式 6~18 个字符"
